package com.flute.framework.monitor;

public class ProcessStatus {
	private double totalMemory;
	private double maxMemory;
	private double freeMemory;

	private ProcessStatus() {
		totalMemory = Runtime.getRuntime().totalMemory() / (double) 1024
				/ (double) 1024;
		maxMemory = Runtime.getRuntime().maxMemory() / (double) 1024
				/ (double) 1024;
		freeMemory = Runtime.getRuntime().freeMemory() / (double) 1024
				/ (double) 1024;
	}

	public static ProcessStatus newProcessStatus() {
		return new ProcessStatus();
	}

	public double getMaxMemory() {
		return maxMemory;
	}

	public double getFreeMemory() {
		return freeMemory;
	}

	public double getTotalMemory() {
		return totalMemory;
	}
}
